/*
 * Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 *
 * This file is part of Harmattan SmashMiner OpenGL game application.
 * 
 * Harmattan SmashMiner OpenGL Example Application version 1.0.0
 *  
 * Latest update: 15.4.2011
 *
 * The Harmattan SmashMiner OpenGL example application demonstrates how to use 
 * the OpenGL ES in Harmattan devices.
 *
 * This example is provided as a starting point for 3rd party
 * developers (you) to ease the implementation of OpenGL based 
 * games. Ideas, parts of code or methodologies that this
 * example application uses can be freely used without restrictions.
 *
 * See file README.txt how to build and compile this example application
 * in the Harmattan SDK environment. 
 * 
 * See file INSTALL.txt to find out what is required to run this
 * application and how to install the application to the device or
 * alternatively in QEMU-emulator.
 *
 * The LICENSE.txt file explains the license this software is provided
 * with. A copy of the same license is included in this source file.
 * 
 */

/*
 * Copyright (C) 2011 by Nokia Corporation.
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 */

import Qt 4.7

// Help content to the controls help view for the page 2
Rectangle {
    id: controlsPage2
    color: "black"

    // Grid with 2 columns for control helps. Column 1 for image and column 2 for text.
    Grid {
        id: controlsGrid

        property int imageColumnWidth: controlsPage2.width * 0.30
        property int textColumnWidth: controlsPage2.width * 0.50

        // 6 * 0.05 + 5 * 0.14 = 1.000
        property int gridSpacing: controlsPage2.height * 0.05
        property int rowHeight: controlsPage2.height * 0.14

        columns: 2

        anchors {
            fill: parent
            margins: gridSpacing
        }

        spacing: gridSpacing

        // PAUSE CONTROL
        Item {
            width: controlsGrid.imageColumnWidth
            height: controlsGrid.rowHeight
            Image {
                source: "qrc:/images/64x64_pause.png"
                anchors.horizontalCenter: parent.horizontalCenter;
                width: controlsGrid.rowHeight
                height: controlsGrid.rowHeight
            }
        }
        Item {
            width: controlsGrid.textColumnWidth
            height: controlsGrid.rowHeight
            Text {
                text: qsTr("PAUSE GAME");
                color: "white"
                font.pointSize: 18
                anchors.verticalCenter: parent.verticalCenter
            }
        }

        // PLAY CONTROL
        Item {
            width: controlsGrid.imageColumnWidth
            height: controlsGrid.rowHeight
            Image {
                source: "qrc:/images/64x64_play.png"
                anchors.horizontalCenter: parent.horizontalCenter;
                width: controlsGrid.rowHeight
                height: controlsGrid.rowHeight
            }
        }
        Item {
            width: controlsGrid.textColumnWidth
            height: controlsGrid.rowHeight
            Text {
                text: qsTr("PLAY GAME");
                color: "white"
                font.pointSize: 18
                anchors.verticalCenter: parent.verticalCenter
            }
        }

        // CONE MODE CONTROL
        Item {
            width: controlsGrid.imageColumnWidth
            height: controlsGrid.rowHeight
            Image {
                source: "qrc:/images/64x64_modeCone.png"
                anchors.horizontalCenter: parent.horizontalCenter;
                width: controlsGrid.rowHeight
                height: controlsGrid.rowHeight
            }
        }
        Item {
            width: controlsGrid.textColumnWidth
            height: controlsGrid.rowHeight
            Text {
                text: qsTr("MINER CONE MODE");
                color: "white"
                font.pointSize: 18
                anchors.verticalCenter: parent.verticalCenter
            }
        }

        // BALL MODE CONTROL
        Item {
            width: controlsGrid.imageColumnWidth
            height: controlsGrid.rowHeight
            Image {
                source: "qrc:/images/64x64_modeBall.png"
                anchors.horizontalCenter: parent.horizontalCenter;
                width: controlsGrid.rowHeight
                height: controlsGrid.rowHeight
            }
        }
        Item {
            width: controlsGrid.textColumnWidth
            height: controlsGrid.rowHeight
            Text {
                text: qsTr("MINER BALL MODE");
                color: "white"
                font.pointSize: 18
                anchors.verticalCenter: parent.verticalCenter
            }
        }

        // DROP BOMB CONTROL
        Item {
            width: controlsGrid.imageColumnWidth
            height: controlsGrid.rowHeight
            Image {
                source: "qrc:/images/64x64_bbutton.png"
                anchors.horizontalCenter: parent.horizontalCenter;
                width: controlsGrid.rowHeight
                height: controlsGrid.rowHeight
            }
        }
        Item {
            width: controlsGrid.textColumnWidth
            height: controlsGrid.rowHeight
            Text {
                text: qsTr("DROP BOMB");
                color: "white"
                font.pointSize: 18
                anchors.verticalCenter: parent.verticalCenter
            }
        }
    }
}
